package ${domainPkg};
import com.bjtct.oom.common.vo.Page;
import com.bjtct.oom.common.utils.JsonUtils;
<#list list as col>
<#if col.list_query=="Y">
	<#if col.data_type=="date"||col.data_type=="datetime">
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.format.annotation.DateTimeFormat.ISO;
import java.util.Date;
	<#break>
	</#if>
</#if>
</#list>
<#assign gentime = .now>
/**
*${name}模块对应的查询类
*@since ${gentime?string['yyyy-MM-dd HH:mm']}
*@author autogen
*/
@SuppressWarnings("serial")
public class ${name?cap_first}Query extends Page{

<#list list?sort_by("list_query") as col>
	<#if col.list_query=="Y">
	/** ${col.column_comment}*/	
		<#if col.data_type=="date">
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd")
	private Date ${col.column_alias}_from;
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd")
	private Date ${col.column_alias}_to;		
		<#elseif col.data_type=="datetime">
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd HH:mm:ss")
	private Date ${col.column_alias}_from;
	@DateTimeFormat(iso=ISO.DATE,pattern="yyyy-MM-dd HH:mm:ss")
	private Date ${col.column_alias}_to;	
		<#else>	
	private ${col.data_type} ${col.column_alias};
		</#if>	
	</#if>
</#list>

<#list list?sort_by("list_query") as col>
	<#if col.list_query=="Y">
	   <#if col.data_type=="date"||col.data_type=="datetime">
	 /**get ${col.column_comment} begin time*/  
	public Date get${col.column_alias?cap_first}_from(){
		return ${col.column_alias}_from;
	}
	/**get ${col.column_comment} end time*/  	
	public Date get${col.column_alias?cap_first}_to(){
		return ${col.column_alias}_to;
	}
	/**set ${col.column_comment} begin time*/  
	public void set${col.column_alias?cap_first}_from(Date ${col.column_alias}_from){
		this.${col.column_alias}_from = ${col.column_alias}_from;
	}
	/**set ${col.column_comment} end time*/  	
	public void set${col.column_alias?cap_first}_to(Date ${col.column_alias}_to){
		this.${col.column_alias}_to = ${col.column_alias}_to;
	}
	   <#else>
	  /**get ${col.column_comment} */  
	 public ${col.data_type}  get${col.column_alias?cap_first}(){
		return this.${col.column_alias};
	 }
	 /**set ${col.column_comment} */  
	 public void set${col.column_alias?cap_first}(${col.data_type} ${col.column_alias}){
		this.${col.column_alias} = ${col.column_alias};
	}
	   </#if>
	</#if>
</#list>
		@Override
	public String toString() {
		
		return JsonUtils.toString(this);
	} 
}